<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>wickr-crypto-c: wickr_identity</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">wickr-crypto-c
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">wickr_identity</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structwickr__identity.html">wickr_identity</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A signing identity on the Wickr system.  <a href="structwickr__identity.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structwickr__identity__chain.html">wickr_identity_chain</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Represents a root -&gt; node relationship as well as it's signature status.  <a href="structwickr__identity__chain.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga43bd60836203349a1c745d0d29bf7706"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__identity.html#ga43bd60836203349a1c745d0d29bf7706">IDENTIFIER_LEN</a>&#160;&#160;&#160;32</td></tr>
<tr class="separator:ga43bd60836203349a1c745d0d29bf7706"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:ga78aefa3835eb13ca75c0129583b5ebfa"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__identity.html#ga78aefa3835eb13ca75c0129583b5ebfa">wickr_identity_chain_status</a> { <b>IDENTITY_CHAIN_STATUS_UNKNOWN</b>, 
<b>IDENTITY_CHAIN_STATUS_VALID</b>, 
<b>IDENTITY_CHAIN_STATUS_INVALID</b>
 }</td></tr>
<tr class="separator:ga78aefa3835eb13ca75c0129583b5ebfa"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga75bfef275a250a32784231e8c042913b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structwickr__identity.html">wickr_identity_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__identity.html#ga75bfef275a250a32784231e8c042913b">wickr_identity_create</a> (wickr_identity_type type, <a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *identifier, <a class="el" href="structwickr__ec__key.html">wickr_ec_key_t</a> *sig_key, <a class="el" href="structwickr__ecdsa__result.html">wickr_ecdsa_result_t</a> *signature)</td></tr>
<tr class="separator:ga75bfef275a250a32784231e8c042913b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga32097764e57e70d85a2e1277146495c9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structwickr__ecdsa__result.html">wickr_ecdsa_result_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__identity.html#ga32097764e57e70d85a2e1277146495c9">wickr_identity_sign</a> (const <a class="el" href="structwickr__identity.html">wickr_identity_t</a> *identity, const <a class="el" href="structwickr__crypto__engine.html">wickr_crypto_engine_t</a> *engine, const <a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *data)</td></tr>
<tr class="separator:ga32097764e57e70d85a2e1277146495c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae820c1efc090fef6a8d27dd700316023"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structwickr__identity.html">wickr_identity_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__identity.html#gae820c1efc090fef6a8d27dd700316023">wickr_node_identity_gen</a> (const <a class="el" href="structwickr__crypto__engine.html">wickr_crypto_engine_t</a> *engine, const <a class="el" href="structwickr__identity.html">wickr_identity_t</a> *root_identity)</td></tr>
<tr class="separator:gae820c1efc090fef6a8d27dd700316023"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga14d1fb3ddd1dbd7797eb9b628eef99fe"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structwickr__identity.html">wickr_identity_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__identity.html#ga14d1fb3ddd1dbd7797eb9b628eef99fe">wickr_identity_copy</a> (const <a class="el" href="structwickr__identity.html">wickr_identity_t</a> *source)</td></tr>
<tr class="separator:ga14d1fb3ddd1dbd7797eb9b628eef99fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9e4a0f3736d52836c9a9fc61794c8ddd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__identity.html#ga9e4a0f3736d52836c9a9fc61794c8ddd">wickr_identity_destroy</a> (<a class="el" href="structwickr__identity.html">wickr_identity_t</a> **identity)</td></tr>
<tr class="separator:ga9e4a0f3736d52836c9a9fc61794c8ddd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga79ca0713d0b90873e584379f26cbd051"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__identity.html#ga79ca0713d0b90873e584379f26cbd051">wickr_identity_serialize</a> (const <a class="el" href="structwickr__identity.html">wickr_identity_t</a> *identity)</td></tr>
<tr class="separator:ga79ca0713d0b90873e584379f26cbd051"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga378e5b6ddabfe2c6ae7dbd5bdc43278e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structwickr__identity.html">wickr_identity_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__identity.html#ga378e5b6ddabfe2c6ae7dbd5bdc43278e">wickr_identity_create_from_buffer</a> (const <a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *buffer, const <a class="el" href="structwickr__crypto__engine.html">wickr_crypto_engine_t</a> *engine)</td></tr>
<tr class="separator:ga378e5b6ddabfe2c6ae7dbd5bdc43278e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4d9053bf0a7ea47c599891dce21d426a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structwickr__fingerprint.html">wickr_fingerprint_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__identity.html#ga4d9053bf0a7ea47c599891dce21d426a">wickr_identity_get_fingerprint</a> (const <a class="el" href="structwickr__identity.html">wickr_identity_t</a> *identity, <a class="el" href="structwickr__crypto__engine.html">wickr_crypto_engine_t</a> engine)</td></tr>
<tr class="separator:ga4d9053bf0a7ea47c599891dce21d426a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8ac0f348981ec55ecbf365d6834a3c28"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structwickr__fingerprint.html">wickr_fingerprint_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__identity.html#ga8ac0f348981ec55ecbf365d6834a3c28">wickr_identity_get_bilateral_fingerprint</a> (const <a class="el" href="structwickr__identity.html">wickr_identity_t</a> *identity, const <a class="el" href="structwickr__identity.html">wickr_identity_t</a> *remote_identity, <a class="el" href="structwickr__crypto__engine.html">wickr_crypto_engine_t</a> engine)</td></tr>
<tr class="separator:ga8ac0f348981ec55ecbf365d6834a3c28"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga79551385194ba6b044b676ce5c7400e6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structwickr__identity__chain.html">wickr_identity_chain_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__identity.html#ga79551385194ba6b044b676ce5c7400e6">wickr_identity_chain_create</a> (<a class="el" href="structwickr__identity.html">wickr_identity_t</a> *root, <a class="el" href="structwickr__identity.html">wickr_identity_t</a> *node)</td></tr>
<tr class="separator:ga79551385194ba6b044b676ce5c7400e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac9d708d340abcd0b54d87434b71d2d9e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structwickr__identity__chain.html">wickr_identity_chain_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__identity.html#gac9d708d340abcd0b54d87434b71d2d9e">wickr_identity_chain_copy</a> (const <a class="el" href="structwickr__identity__chain.html">wickr_identity_chain_t</a> *source)</td></tr>
<tr class="separator:gac9d708d340abcd0b54d87434b71d2d9e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga12f5b33c4947b6a2ca3df3bdaacafa10"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__identity.html#ga12f5b33c4947b6a2ca3df3bdaacafa10">wickr_identity_chain_validate</a> (const <a class="el" href="structwickr__identity__chain.html">wickr_identity_chain_t</a> *chain, const <a class="el" href="structwickr__crypto__engine.html">wickr_crypto_engine_t</a> *engine)</td></tr>
<tr class="separator:ga12f5b33c4947b6a2ca3df3bdaacafa10"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadbddf6d49fddb2df103486970b3d564b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__wickr__identity.html#gadbddf6d49fddb2df103486970b3d564b">wickr_identity_chain_destroy</a> (<a class="el" href="structwickr__identity__chain.html">wickr_identity_chain_t</a> **chain)</td></tr>
<tr class="separator:gadbddf6d49fddb2df103486970b3d564b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="ga43bd60836203349a1c745d0d29bf7706"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga43bd60836203349a1c745d0d29bf7706">&#9670;&nbsp;</a></span>IDENTIFIER_LEN</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define IDENTIFIER_LEN&#160;&#160;&#160;32</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Identifiers should be 32 bytes on the Wickr system, this requirement could drop or change in the future </p>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="ga78aefa3835eb13ca75c0129583b5ebfa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga78aefa3835eb13ca75c0129583b5ebfa">&#9670;&nbsp;</a></span>wickr_identity_chain_status</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__wickr__identity.html#ga78aefa3835eb13ca75c0129583b5ebfa">wickr_identity_chain_status</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Identity chain status</p>
<p>UNKNOWN - Signature validation has never been attempted on the chain VALID - Signature validation has been attempted and has passed on the chain INVALID - Signature validation has been attempted and has failed on chain </p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="gac9d708d340abcd0b54d87434b71d2d9e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac9d708d340abcd0b54d87434b71d2d9e">&#9670;&nbsp;</a></span>wickr_identity_chain_copy()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structwickr__identity__chain.html">wickr_identity_chain_t</a>* wickr_identity_chain_copy </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structwickr__identity__chain.html">wickr_identity_chain_t</a> *&#160;</td>
          <td class="paramname"><em>source</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Copy an identity chain</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">source</td><td>the identity chain to copy </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a newly allocated identity chain holding a deep copy of the properties of 'source' </dd></dl>

</div>
</div>
<a id="ga79551385194ba6b044b676ce5c7400e6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga79551385194ba6b044b676ce5c7400e6">&#9670;&nbsp;</a></span>wickr_identity_chain_create()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structwickr__identity__chain.html">wickr_identity_chain_t</a>* wickr_identity_chain_create </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structwickr__identity.html">wickr_identity_t</a> *&#160;</td>
          <td class="paramname"><em>root</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structwickr__identity.html">wickr_identity_t</a> *&#160;</td>
          <td class="paramname"><em>node</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Create an identity chain from components</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">root</td><td>see '<a class="el" href="structwickr__identity__chain.html" title="Represents a root -&gt; node relationship as well as it&#39;s signature status.">wickr_identity_chain</a>' property documentation </td></tr>
    <tr><td class="paramname">node</td><td>see '<a class="el" href="structwickr__identity__chain.html" title="Represents a root -&gt; node relationship as well as it&#39;s signature status.">wickr_identity_chain</a>' property documentation </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a newly allocated identity chain that takes ownership of the passed inputs </dd></dl>

</div>
</div>
<a id="gadbddf6d49fddb2df103486970b3d564b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gadbddf6d49fddb2df103486970b3d564b">&#9670;&nbsp;</a></span>wickr_identity_chain_destroy()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void wickr_identity_chain_destroy </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structwickr__identity__chain.html">wickr_identity_chain_t</a> **&#160;</td>
          <td class="paramname"><em>chain</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Destroy an identity chain</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">chain</td><td>a pointer to the identity chain to destroy. All properties of '*chain' will also be destroyed </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga12f5b33c4947b6a2ca3df3bdaacafa10"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga12f5b33c4947b6a2ca3df3bdaacafa10">&#9670;&nbsp;</a></span>wickr_identity_chain_validate()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool wickr_identity_chain_validate </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structwickr__identity__chain.html">wickr_identity_chain_t</a> *&#160;</td>
          <td class="paramname"><em>chain</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structwickr__crypto__engine.html">wickr_crypto_engine_t</a> *&#160;</td>
          <td class="paramname"><em>engine</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Verify the validity of an identity chain</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">chain</td><td>the chain to validate </td></tr>
    <tr><td class="paramname">engine</td><td>a crypto engine that supports verifying signatures </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the 'signature' of the 'node' property of 'chain' can be properly verified with the public 'sig_key' from the 'root' property of 'chain' </dd></dl>

</div>
</div>
<a id="ga14d1fb3ddd1dbd7797eb9b628eef99fe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga14d1fb3ddd1dbd7797eb9b628eef99fe">&#9670;&nbsp;</a></span>wickr_identity_copy()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structwickr__identity.html">wickr_identity_t</a>* wickr_identity_copy </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structwickr__identity.html">wickr_identity_t</a> *&#160;</td>
          <td class="paramname"><em>source</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Copy an identity</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">source</td><td>the identity to copy </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a newly allocated identity holding a deep copy of the properties of 'source' </dd></dl>

</div>
</div>
<a id="ga75bfef275a250a32784231e8c042913b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga75bfef275a250a32784231e8c042913b">&#9670;&nbsp;</a></span>wickr_identity_create()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structwickr__identity.html">wickr_identity_t</a>* wickr_identity_create </td>
          <td>(</td>
          <td class="paramtype">wickr_identity_type&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *&#160;</td>
          <td class="paramname"><em>identifier</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structwickr__ec__key.html">wickr_ec_key_t</a> *&#160;</td>
          <td class="paramname"><em>sig_key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structwickr__ecdsa__result.html">wickr_ecdsa_result_t</a> *&#160;</td>
          <td class="paramname"><em>signature</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Create an identity from components</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">type</td><td>see '<a class="el" href="structwickr__identity.html" title="A signing identity on the Wickr system.">wickr_identity</a>' property documentation </td></tr>
    <tr><td class="paramname">identifier</td><td>see '<a class="el" href="structwickr__identity.html" title="A signing identity on the Wickr system.">wickr_identity</a>' property documentation </td></tr>
    <tr><td class="paramname">sig_key</td><td>see '<a class="el" href="structwickr__identity.html" title="A signing identity on the Wickr system.">wickr_identity</a>' property documentation </td></tr>
    <tr><td class="paramname">signature</td><td>see '<a class="el" href="structwickr__identity.html" title="A signing identity on the Wickr system.">wickr_identity</a>' property documentation </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a newly allocated identity that takes ownership of the passed inputs </dd></dl>

</div>
</div>
<a id="ga378e5b6ddabfe2c6ae7dbd5bdc43278e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga378e5b6ddabfe2c6ae7dbd5bdc43278e">&#9670;&nbsp;</a></span>wickr_identity_create_from_buffer()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structwickr__identity.html">wickr_identity_t</a>* wickr_identity_create_from_buffer </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structwickr__crypto__engine.html">wickr_crypto_engine_t</a> *&#160;</td>
          <td class="paramname"><em>engine</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Create an identity from a buffer that was created with 'wickr_identity_serialize'</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">buffer</td><td>the buffer that contains a serialized representation of an identity </td></tr>
    <tr><td class="paramname">engine</td><td>the crypto engine to use to import the key components of the identity </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>deserialized identity or null if the deserialization fails </dd></dl>

</div>
</div>
<a id="ga9e4a0f3736d52836c9a9fc61794c8ddd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga9e4a0f3736d52836c9a9fc61794c8ddd">&#9670;&nbsp;</a></span>wickr_identity_destroy()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void wickr_identity_destroy </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structwickr__identity.html">wickr_identity_t</a> **&#160;</td>
          <td class="paramname"><em>identity</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Destroy an identity</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">identity</td><td>a pointer to the identity to destroy. All properties of '*identity' will also be destroyed </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga8ac0f348981ec55ecbf365d6834a3c28"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8ac0f348981ec55ecbf365d6834a3c28">&#9670;&nbsp;</a></span>wickr_identity_get_bilateral_fingerprint()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structwickr__fingerprint.html">wickr_fingerprint_t</a>* wickr_identity_get_bilateral_fingerprint </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structwickr__identity.html">wickr_identity_t</a> *&#160;</td>
          <td class="paramname"><em>identity</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structwickr__identity.html">wickr_identity_t</a> *&#160;</td>
          <td class="paramname"><em>remote_identity</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structwickr__crypto__engine.html">wickr_crypto_engine_t</a>&#160;</td>
          <td class="paramname"><em>engine</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>A fingerprint that is unique between identity and remote_identity</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">identity</td><td>the identity to get a bilateral fingerprint of </td></tr>
    <tr><td class="paramname">remote_identity</td><td>the other party included in the fingerprint </td></tr>
    <tr><td class="paramname">engine</td><td>engine the crypto engine to use for underlying hash operations </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a bilateral fingerprint of (identity,remote_identity) or (remote_identity,identity) calculated using SHA512(fingerprint(identity) || fingerprint(remote_identity)). </dd></dl>

</div>
</div>
<a id="ga4d9053bf0a7ea47c599891dce21d426a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4d9053bf0a7ea47c599891dce21d426a">&#9670;&nbsp;</a></span>wickr_identity_get_fingerprint()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structwickr__fingerprint.html">wickr_fingerprint_t</a>* wickr_identity_get_fingerprint </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structwickr__identity.html">wickr_identity_t</a> *&#160;</td>
          <td class="paramname"><em>identity</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structwickr__crypto__engine.html">wickr_crypto_engine_t</a>&#160;</td>
          <td class="paramname"><em>engine</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>A unique fingerprint representing the identifier and public signing key of this identity. See '<a class="el" href="fingerprint_8h_source.html">fingerprint.h</a>'</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">identity</td><td>the identity to get a unique fingerprint of </td></tr>
    <tr><td class="paramname">engine</td><td>the crypto engine to use for underlying hash operations </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a unique fingerprint currently calculated as SHA512(identifier || sig_pub-&gt;pub_data) </dd></dl>

</div>
</div>
<a id="ga79ca0713d0b90873e584379f26cbd051"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga79ca0713d0b90873e584379f26cbd051">&#9670;&nbsp;</a></span>wickr_identity_serialize()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structwickr__buffer.html">wickr_buffer_t</a>* wickr_identity_serialize </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structwickr__identity.html">wickr_identity_t</a> *&#160;</td>
          <td class="paramname"><em>identity</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Serialize an identity to bytes</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">identity</td><td>the identity to serialize </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a buffer containing a serialized representation of 'identity' or null if serialization fails </dd></dl>

</div>
</div>
<a id="ga32097764e57e70d85a2e1277146495c9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga32097764e57e70d85a2e1277146495c9">&#9670;&nbsp;</a></span>wickr_identity_sign()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structwickr__ecdsa__result.html">wickr_ecdsa_result_t</a>* wickr_identity_sign </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structwickr__identity.html">wickr_identity_t</a> *&#160;</td>
          <td class="paramname"><em>identity</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structwickr__crypto__engine.html">wickr_crypto_engine_t</a> *&#160;</td>
          <td class="paramname"><em>engine</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structwickr__buffer.html">wickr_buffer_t</a> *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sign provided data using an identity signing key</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">identity</td><td>the identity to use for signing </td></tr>
    <tr><td class="paramname">engine</td><td>a crypto engine supporting signatures using the identity's signing key </td></tr>
    <tr><td class="paramname">data</td><td>buffer to sign </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>an ECDSA result containing a signature of 'data' using the 'sig_key' property of 'identity'. NULL if the provided identity does not contain a private signing key </dd></dl>

</div>
</div>
<a id="gae820c1efc090fef6a8d27dd700316023"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae820c1efc090fef6a8d27dd700316023">&#9670;&nbsp;</a></span>wickr_node_identity_gen()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structwickr__identity.html">wickr_identity_t</a>* wickr_node_identity_gen </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structwickr__crypto__engine.html">wickr_crypto_engine_t</a> *&#160;</td>
          <td class="paramname"><em>engine</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structwickr__identity.html">wickr_identity_t</a> *&#160;</td>
          <td class="paramname"><em>root_identity</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Generate a new random node identity, given a root identity</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">engine</td><td>a crypto engine supporting random Elliptic Curve Key generation </td></tr>
    <tr><td class="paramname">root_identity</td><td>a root identity that supports generating signatures with a private signing key </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a newly allocated node identity signing by root identity 'root_identity'. The 'identifier' property of the node is generated at random to be 'IDENTIFIER_LEN' in length (currently 32 bytes). NULL if root_identity is not a root, or it does not contain a private signing key </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>
